import { expect, test } from 'vitest'

import * as utils from './index.js'

test('exports utils', () => {
  expect(Object.keys(utils)).toMatchInlineSnapshot(`
    [
      "parseAbi",
      "parseAbiItem",
      "parseAbiParameter",
      "parseAbiParameters",
      "parseAccount",
      "publicKeyToAddress",
      "decodeAbiParameters",
      "decodeErrorResult",
      "decodeEventLog",
      "decodeFunctionData",
      "decodeFunctionResult",
      "encodeAbiParameters",
      "encodeDeployData",
      "encodeErrorResult",
      "encodeEventTopics",
      "encodeFunctionData",
      "encodeFunctionResult",
      "encodePacked",
      "formatAbiItem",
      "formatAbiParams",
      "formatAbiItemWithArgs",
      "getAbiItem",
      "parseEventLogs",
      "getAddress",
      "getContractAddress",
      "getCreate2Address",
      "getCreateAddress",
      "isAddress",
      "isAddressEqual",
      "hashAuthorization",
      "recoverAuthorizationAddress",
      "serializeAuthorizationList",
      "verifyAuthorization",
      "buildRequest",
      "ccipRequest",
      "ccipFetch",
      "offchainLookup",
      "offchainLookupAbiItem",
      "offchainLookupSignature",
      "assertCurrentChain",
      "defineChain",
      "extractChain",
      "getChainContractAddress",
      "concat",
      "concatBytes",
      "concatHex",
      "isBytes",
      "isHex",
      "pad",
      "padBytes",
      "padHex",
      "size",
      "slice",
      "sliceBytes",
      "sliceHex",
      "trim",
      "bytesToBigInt",
      "bytesToBigint",
      "bytesToBool",
      "bytesToNumber",
      "bytesToString",
      "fromBytes",
      "fromHex",
      "hexToBigInt",
      "hexToBool",
      "hexToNumber",
      "hexToString",
      "fromRlp",
      "boolToBytes",
      "hexToBytes",
      "numberToBytes",
      "stringToBytes",
      "toBytes",
      "boolToHex",
      "bytesToHex",
      "numberToHex",
      "stringToHex",
      "toHex",
      "toRlp",
      "getCallError",
      "getContractError",
      "getEstimateGasError",
      "containsNodeError",
      "getNodeError",
      "getTransactionError",
      "defineBlock",
      "formatBlock",
      "extract",
      "defineFormatter",
      "formatLog",
      "defineTransaction",
      "formatTransaction",
      "transactionType",
      "defineTransactionReceipt",
      "defineTransactionRequest",
      "formatTransactionRequest",
      "getAction",
      "isHash",
      "keccak256",
      "ripemd160",
      "sha256",
      "toEventHash",
      "toEventSelector",
      "getEventSelector",
      "toEventSignature",
      "getEventSignature",
      "toFunctionHash",
      "toFunctionSelector",
      "getFunctionSelector",
      "toFunctionSignature",
      "getFunctionSignature",
      "createNonceManager",
      "nonceManager",
      "arrayRegex",
      "bytesRegex",
      "integerRegex",
      "getSocket",
      "rpc",
      "getHttpRpcClient",
      "getSocketRpcClient",
      "socketClientCache",
      "getWebSocketRpcClient",
      "hashMessage",
      "hashStruct",
      "hashTypedData",
      "isErc6492Signature",
      "isErc8010Signature",
      "parseErc6492Signature",
      "parseErc8010Signature",
      "recoverAddress",
      "recoverMessageAddress",
      "recoverPublicKey",
      "recoverTypedDataAddress",
      "serializeErc6492Signature",
      "serializeErc8010Signature",
      "verifyHash",
      "verifyMessage",
      "verifyTypedData",
      "stringify",
      "assertRequest",
      "assertTransactionEIP1559",
      "assertTransactionEIP2930",
      "assertTransactionLegacy",
      "getSerializedTransactionType",
      "getTransactionType",
      "parseTransaction",
      "serializeAccessList",
      "serializeTransaction",
      "serializeTypedData",
      "validateTypedData",
      "formatEther",
      "formatGwei",
      "formatUnits",
      "parseEther",
      "parseGwei",
      "parseUnits",
    ]
  `)
})
